package com.fire.market.integration.service.impl;

import com.fire.component.dto.SingleResponse;
import com.fire.market.promo.api.dto.PromoInfo;
import com.fire.market.promo.api.service.PromoQueryFrontService;
import com.fire.market.integration.service.PromoIntegrationService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

/**
 * PromoIntegrationServiceImpl
 *
 * @author zwd
 * @date 2021/7/20
 */
@Service
public class PromoIntegrationServiceImpl implements PromoIntegrationService {
    @Reference
    PromoQueryFrontService promoQueryFrontService;

    @Override
    public PromoInfo queryPromoByItemId(Integer id) {
        SingleResponse<PromoInfo> promoInfoSingleResponse = promoQueryFrontService.queryPromo(id);
        return promoInfoSingleResponse.getData();
    }
}
